<?php

class RepositorioController extends Zend_Controller_Action {   
	
	public function indexAction()    {
		
		global $db, $questoes_por_volume, $base_url, $_GET, $_SESSION ;
		
		require_once('classes/class.questao.php') ;
		
		$questoes = new Questao($db) ;
		$this->view->base_url = $base_url ;
		$arr_exibe_questoes = array (
									 'id',
									 'titulo',
									 '(SELECT COUNT(*) FROM usuarioresponde WHERE Questao_id = id) AS contador_submissoes'
									);
		$this->view->questoes = $questoes->select_from($arr_exibe_questoes, 
													   'LIMIT ' . ($_GET['v']*$questoes_por_volume) . ',' . $questoes_por_volume) ;
	}
	
	
}


?>